﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace VirtualOrg.DB
{
    public class DataHelper
    {
        public static DataSet GetTaskMasterData(long orgID)
        {
            DataSet resultset=new DataSet();
            string sConnectionString;
            sConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["VirtualOrg.DB.Properties.Settings.virtualorg_storeConnectionString"].ConnectionString;
            using (SqlConnection objConn = new SqlConnection(sConnectionString))
            {
                objConn.Open();
                SqlCommand command = new SqlCommand("GetTaskMasterData", objConn);
                command.CommandType = CommandType.StoredProcedure;
                command.Parameters.Add(new SqlParameter("@OrgID", orgID));
                SqlDataAdapter adapter = new SqlDataAdapter(command);
                adapter.Fill(resultset);
            }

            return resultset;

        }
    }
}
